import BasicTable from "./BasicTable/index.vue";
// import mapBase2D from "./cme-base2D/view/index.vue";
import mapBase2D from "./cme-mapboxCore/index.vue";
import SvgIcon from "./SvgIcon/Index.vue";
import cmeCard from "./cme-card/index.vue";
import cmeDialog from "./cme-dialog/index.vue";
import cmeToolbar from "./cme-toolbar/index.vue";
import cmeSelectIcon from "./cme-selectIcon/Index.vue";
import cmeTag from "./cme-tag/index.vue";
import cmeGlobalIcon from "./cme-globalIcon/index.vue";


import type { App, Component } from "vue";
// 对外暴露插件对象，注册全局组件
const components: { [name: string]: Component } = {
  SvgIcon,
  BasicTable,
  mapBase2D,
  cmeToolbar,
  cmeDialog,
  cmeCard,
  cmeSelectIcon,
  cmeTag,
  cmeGlobalIcon,
};
export default {
  // install方法， Object.keys()得到对象所有的key
  install(app: App) {
    Object.keys(components).forEach((key: string) => {
      app.component(key, components[key]);
    });
  }
};
